<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

/**
 * 许愿树活动
 */
class WishTree extends Model
{
    protected $table = 'act_wish_tree';

    const WISH_COIN = [
        ['times' => 1, 'coin' => 20],
        ['times' => 10, 'coin' => 200],
        ['times' => 100, 'coin' => 2000],
    ];

    public function giftInfo()
    {
        return $this->belongsTo(Gift::class, 'wish_gift_id', 'id');
    }

    public function userProfile()
    {
        return $this->belongsTo(UserProfile::class, 'user_id', 'user_id');
    }
}
